﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Tencent.OA.ACM.Entity.RouteInfo>" %>
<%@ Import Namespace="Tencent.OA.ACM.Entity" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeaderPlaceHolder" runat="server">
    <script type="text/javascript" language="javascript" src="<%=this.Url.Content("~/caches/base_info/routeType.js?rd="+new Random().NextDouble()) %>"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContainerPlaceHolder" runat="server">
    <div class="title ">
        <a href="<%=this.Url.Content("~/StaffRoute/RoutePartion") %>">【返回】</a> <%=this.Model.BusTypeName%>-<%=this.Model.RouteName%>
    </div>
    <div class="form_table">
     <div style="width: 800px; float: left;">
        <table cellpadding="0" cellspacing="0" style="width: 100%">
           <%-- <tr>
                <th>
                    路线名：
                </th>
                <td>
                    <%=this.Html.LiteralFor(model => model.RouteName)%>
                </td>
            </tr>--%>
            <tr>
                <th>
                    城 市：
                </th>
                <td>
                    <%=this.Html.LiteralFor(model => model.CityName)%>
                </td>
            </tr>
           <%-- <tr>
                <th>
                    班车属性：
                </th>
                <td>
                    <%= this.Html.LiteralFor(model => model.BusTypeName)%>
                </td>
            </tr>--%>
           <%-- <tr>
                <th>
                    路线卡号码：
                </th>
                <td>
                    <%= this.Html.LiteralFor(model => model.RouteCardId)%>
                </td>
            </tr>
            <tr>
                <th>
                    台 次：
                </th>
                <td>
                    <%= this.Html.LiteralFor(model => model.BusNumber)%>
                </td>
            </tr>
            <tr>
                <th>
                    运行方向：
                </th>
                <td>
                    <%= this.Html.LiteralFor(model => model.BusDirectionDisp)%>
                </td>
            </tr>--%>
            <tr>
                <th>
                    运行时间：
                </th>
                <td>
                    每<%= this.Html.LiteralFor(model => model.WorkingWeekDisp) %>
                </td>
            </tr>
            <tr>
                <th>
                    容纳人数：
                </th>
                <td>
                    <%= this.Html.LiteralFor(model => model.MaxPeoples)%>
                </td>
            </tr>
            <tr>
                <th>
                    负责人：
                </th>
                <td>
                    <%=this.Html.LiteralFor(model => model.Responser)%>
                </td>
            </tr>
            <tr>
                <th style="vertical-align:top;">
                    站 点：
                </th>
                <td>
               <div id="phontlist">
                <%
                    IList<StationInfo> si = ViewData["stationInfo"] as IList<StationInfo>;                   
                    if (si != null && si.Count() > 0)
                    {
                        foreach(StationInfo sta in si)
                        {
                            %>
                            <div style="margin-left:5px; "><%=sta.StationName %>(<%=sta.EstimateArriveTime %>)&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="javascript:;" onclick=newFocus(null,"<%=sta.StationId %>");>关注此站点</a></div>
                                <div class="dv_photo_frame" style="border-bottom:dashed 1px #ccc;"  sid="<%=sta.StationId %>" >                                
                                
                                <%--<div class="clear"></div>--%>
                                </div>
                            <%
                        }
                    }
                %>
                </div>
                </td>
            </tr>
            <tr>
                <th></th>
                <td></td>
            </tr>
          <%--  <tr>
                <th>
                    计算站点GPS坐标：
                </th>
                <td>
                    <%=Html.Literal(this.ViewData.Model.IsNeedComputeGpsForChkBox ? "是" : "否")%>
                </td>
            </tr>--%>
            <tr>
                <th>
                    备 注：
                </th>
                <td>
                    <%= this.Html.LiteralFor(model => model.Remark)%>
                </td>
            </tr>
            <tr>
                <th>
                    &nbsp;
                </th>
                <td>
                    <%--<input type="button" value="保 存" />--%>
                    <%--<input type="button" value="返  回" onclick="window.location='<%=this.Url.Content("~/Route") %>'" />--%>
                </td>
            </tr>
        </table>
    </div>
      <div >
       <%-- <div>
            温馨提示<br />
            您可以按 &nbsp;<b>CTRL+ F</b> &nbsp;进行页面查询。
        </div>       --%>
    </div>
    
    <div class="clear">
    </div>

    <script language="javascript">
        var dircache = '<%=this.Url.Content("~/caches/atta_img/") %>';
        var photoUrl = '<%=this.Url.Content("~/Home/GetPictureThumb?width=130&height=100&")%>';
        var photoOriginalUrl = '<%=this.Url.Content("~/Home/GetOriginalPicture?id=") %>';
        var jsUrl = '<%=this.Url.Content("~/caches/base_info/routeType.js") %>';
        var ATTATCH_IMG = [];
        
        $(document).ready(function() {
            loadJs();
            initImg();
        });
        function loadJs() {
             var rtjs = $.ajax({
                url: jsUrl+"?rd="+Math.random(),
                async: false,
                dataType: "json"
            }).responseText;
            try {
                ATTATCH_IMG = eval("(" + rtjs + ")");
            } catch (ex) { ATTATCH_IMG = []; }
        }
        }
        function initImg() {
            $(".dv_photo_frame").each(function() {
                var sid = $(this).attr("sid");

                var ri = $.ajax({
                    url: dircache + sid + '.js?rnd=' + getTimeTick(),
                    async: false,
                    dataType: "json"
                }).responseText;

                try {
                    var attaObj = eval(ri);
                    var photoContainer = $(this);
                    if (typeof (ATTATCH_IMG) != 'undefined') {
                        $.each(ATTATCH_IMG, function(n, o) {
                            var html = '<div class="attatch_img_item"><a href="' + photoOriginalUrl + o.attaId + '" target="_blank"> '
                                                  + '<img src="' + photoUrl
                                                  + 'fileName=' + o.attaId + o.pf
                                                  + '&contentType=' + o.ct
                                                  + '" /><div class="dv_photo_desc" title="' + o.attaName + '">' + o.attaName + '</div>'
                                                  + '</a></div>';
                            photoContainer.append(html);
                        });
                        photoContainer.append('<div class="clear"></div>');
                    }
                } catch (ex) { ; }
            });
        }
    </script>
    </div>
</asp:Content>
